<html xmlns:wicket>
<wicket:extend>
	<div class="page-title">Branches</div>
	<div id="project-branches">
		<div class="list">
			<div class="head clearfix">
				<div class="input-group pull-left base">
					<span class="input-group-addon">Base</span> 
					<input wicket:id="baseBranch" type="hidden" class="form-control">					
				</div>
				<div class="pull-left clearable-wrapper">
					<input wicket:id="searchBranches" class="form-control search" placeholder="Search branches">
				</div>
				<div class="pull-left">
					<a wicket:id="createBranch" class="btn btn-success"><i class="fa fa-plus"></i> Create</a>
				</div>
			</div>
			<table wicket:id="branches" class="table table-hover">
				<tr wicket:id="branches">
					<td class="detail">
						<div class="title">
							<a wicket:id="branchLink" class="name"><span wicket:id="name"></span></a>
							<span wicket:id="buildStatus" class="build-status"></span>
							<span class="label label-default" wicket:id="default">default</span>
							<a wicket:id="makeDefault" class="make-default btn btn-xs btn-default"><i class="fa fa-check"></i> make default</a>
						</div>
						<div class="commit-message">
							<a wicket:id="messageLink"><span wicket:id="message"></span></a>
						</div>
						<div class="commit-contributor">
							<span wicket:id="contributor" class="contributor"></span>
						</div>
						<div wicket:id="actions" class="actions">
							<a wicket:id="effectiveRequest"><i class="fa fa-ext fa-branch-compare"></i> <span wicket:id="label"></span></a>
							<a wicket:id="delete" title="Delete this branch"><i class="fa fa-trash"></i> Delete</a>
						</div>
					</td>
					<td class="behind behind-ahead">
						<div>
							<div class="text">
								<a wicket:id="behindLink"><span wicket:id="count"></span> behind</a>
							</div>
							<div class="bar" wicket:id="behindBar"></div>
						</div>
					</td>
					<td class="ahead behind-ahead">
						<div>
							<div class="text">
								<a wicket:id="aheadLink"><span wicket:id="count"></span> ahead</a>
							</div>
							<div class="bar" wicket:id="aheadBar"></div>
						</div>
					</td>
				</tr>
			</table>		
			<div class="center"><ul wicket:id="branchesPageNav"></ul></div>
			<div wicket:id="noBranches" class="alert alert-warning">No branches found</div>
			<div id="searching-branches" class="ajax-indicator">
				<img src="/img/ajax-indicator-big.gif">
			</div>
		</div>
	</div>
	<wicket:fragment wicket:id="createBranchFrag">
		<form wicket:id="form" class="create-branch">
			<div class="modal-header">
				<h4 class="modal-title">Create Branch</h4>
			</div>
			<div class="modal-body">
				<div wicket:id="feedback"></div>
				<div class="form-group">
					<label>Branch Name *</label>
					<input wicket:id="name" class="form-control">
				</div>
				<div class="form-group">
					<label>Create From *</label>
					<div>
						<a wicket:id="revision" class="btn btn-default"></a>
					</div>
				</div>
			</div>
			<div class="modal-footer">
				<div class="form-group">
					<button wicket:id="create" class="btn btn-primary">Create</button>
					<button wicket:id="cancel" class="btn btn-default">Cancel</button>
				</div>
			</div>
		</form>
	</wicket:fragment>
	<wicket:fragment wicket:id="confirmDeleteBranchFrag">
		<div class="modal-header">
			<button wicket:id="close" type="button" class="close">&times;</button>
			<h4 class="modal-title">Please confirm</h4>
		</div>
		<div wicket:id="body" class="modal-body"></div>
		<div class="modal-footer">
			<a wicket:id="delete" class="btn btn-danger">Delete</a>
			<a wicket:id="cancel" class="btn btn-default">Cancel</a>
		</div>
	</wicket:fragment>
	<wicket:fragment wicket:id="openRequestsFrag">
		There are <a wicket:id="openRequests">open pull requests</a> against branch <span wicket:id="branch"></span>. 
		These pull requests will be discarded if the branch is deleted.
	</wicket:fragment>
</wicket:extend>
</html>